<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Extends options</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Extends options</h1>
    <hr>
    <div id="app">
        ${num}
        <p><button @click="add">add</button></p>
    </div>

    <script type="text/javascript">
        var extendobj={
            created:function(){
                console.log("我是被扩展出来的"+this.num);
            }
        };
        var app = new Vue({
            el:'#app',
            data:{
                num:1
            },
            methods:{
                add:function(){
                    this.num++
                }
            },
            updated:function(){
                console.log("我是原生混入")
            },
            extends:extendobj,
            delimiters:['${','}']

        })
    </script>
</body>
</html>